extend layout
block append css
    link(rel="stylesheet" href="/duimen/css/index.css")
    link(rel="stylesheet" href="/duimen/css/detail.css")
    link(rel="stylesheet" href="/duimen/css/swiper.min.css")
block content
    style body{background-color:#f7f7f7;padding-top:.88rem;}
    header.header
        span.makePosition 选择小区
        span.triangle
        span.add-tie 
        ul.fa-tie.hide
            li: a(href="/duimen/admin/post-post.html") 发布帖子
            li.admin(style="display:none"): a(href="/duimen/admin/post-sign.html") 发布报名
            li.admin(style="display:none"): a(href="/duimen/admin/post-vote.html") 发布投票
            li.admin(style="display:none"): a(href="/duimen/admin/post-notice2.html") 发布公告
    .reload
        span.spin
        span 刷新中...
    .dm-tab
      ul
    .dm-banner
        ul
            li
                a(href="http://snxdsit.cnsuning.com/duimen/report/reportList.html"): img(src="/duimen/temp/banner.jpg")
            li
                a(href="http://m.suning.com?snstoreTypeCode=1007"): img(src="/duimen/temp/banner.jpg")
            li
                a: img(src="/duimen/temp/banner.jpg")
            li
                a: img(src="/duimen/temp/banner.jpg")
    .dm-tabs.clearfix
        a.cur 门圈儿
        a 小区消息
        a 发现好生活
    div.tiecontent
block append js
    script(src="/duimen/js/index.js")
    script(src="/duimen/js/swiper.js")
    script#tag_tpl(type="text/html").
        {{each result as value i}}
            {{if i}}
                <li data-id="{{value.tagId}}"><a>{{value.tagName}}</a></li>            
            {{else}}
                <li class="cur-tab" data-id="{{value.tagId}}"><a>{{value.tagName}}</a></li>
            {{/if}}
        {{/each}}
    script#tie_tpl(type="text/html").
        {{each result as tie i}}
            {{if !tie.postType }}
                <div>
                    <div class="tie-mod" data-id="{{tie.postId}}">
                        <img src="{{tie.custImage}}" class="avatar" onerror="this.src='/duimen/css/images/empty.png'">
                        <h3>{{tie.custName}}<span class="time">{{tie.postTime}}</span></h3>
                        {{if tie.postTitle.length>100}}
                            <p>{{tie.postTitle.substring(0,98)+'...'}}</p>
                            <a href="javascript:;" class="see-text">查看原文</a>
                        {{else}}
                            <p>{{tie.postTitle}}</p>
                        {{/if}}
                        {{if tie.images}}
                            <div class="tie-tu">
                                <div class="swiper-container">
                                    <div class="swiper-wrapper">
                                        {{each tie.images as image}}
                                            <img class="swiper-slide" src="{{image}}">
                                        {{/each}}
                                    </div>
                                </div>
                            </div>
                            <span class="page">1/{{tie.images.length||0}}</span>
                        {{/if}}
                    </div>
                    <div class="tie-op">
                        {{if tie.praiseFlag}}
                            <span class="J-praise praised" data-postid="{{tie.postId}}">
                        {{else}}
                            <span class="J-praise " data-postid="{{tie.postId}}">
                        {{/if}}
                            <i class="up like"></i>
                            <a href="javascript:void(0)">赞</a>
                        </span>
                            <i class="comt like J-comm"></i>
                            <a href="javascript:void(0)" class="J-comm">评论</a>
                            <em></em>
                    </div>
                    <div class="tie-like">
                    {{if tie.praiseCount==0}}
                        <br>
                    {{else if tie.praiseCount<10}}
                        <i class="up"></i>
                        <p>{{tie.praiseListChn}}觉得很赞</p>
                    {{else}}
                        <i class="up"></i>
                        <p>{{tie.praiseListChn}}等{{tie.praiseCount||0}}人觉得很赞</p>
                    {{/if}}
                    <ul class="com-cnt">
                        {{each tie.commentList as comment }}
                            <li data-custno="{{comment.custNo}}"><em>{{comment.custName}}：</em><span>{{comment.commentContent}}</span></li>
                        {{/each}}
                    </ul>
                    </div>
                </div>
            {{else}}
                <div class="tie-act clearfix" data-id="{{tie.postId}}">
                    <p>
                        <span>{{tie.postTypeChn}}</span>
                        {{tie.postTitle}}
                    </p><em>{{tie.postTime}}</em>
                </div>
            {{/if}}
        {{/each}}